package router

import (
	controller "gitee.com/wangshh_123/cross-pay-go/src/controller/system"
	"gitee.com/wangshh_123/cross-pay-go/src/middleware"

	"github.com/gin-gonic/gin"
)

// SetupUserInfoRoutes 设置用户信息路由
func SetupUserInfoRoutes(r *gin.RouterGroup, userInfoController *controller.UserInfoController) {
	// 用户信息路由组
	userInfoGroup := r.Group("/user")
	userInfoGroup.Use(middleware.AuthMiddleware())
	{
		// 获取当前用户信息
		userInfoGroup.GET("/info", userInfoController.GetCurrentUserInfo)

		// 获取当前用户ID
		userInfoGroup.GET("/id", userInfoController.GetCurrentUserID)

		// 获取首页信息
		userInfoGroup.GET("/homeInfo", middleware.PlatformInfoMiddleware(), userInfoController.GetHomeInfo)
	}
}
